package com.linln.modules.wtpshop.repository;


import com.linln.modules.shopsService.domain.Shops;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author zsc
 * @date 2020/11/19
 */
@Mapper
public interface ShopMapper {

    List<Map<String, Object>> getNearbyShops(@Param("lon") String lon, @Param("lat") String lat, @Param("areaIds") List<Integer> areaIds, @Param("shopType") Integer shopType,@Param("reserve") Integer reserve);

    /**
     * 按照店铺的评分排序
     *
     * @return 店铺列表
     */
    List<Map<String, Object>> getShopOrderScore(@Param("areaIds") List<Integer> areaIds, @Param("shopType") Integer shopType,@Param("reserve") Integer reserve);


    /**
     * 按照店铺
     *
     * @return 店铺列表
     */
    List<Map<String, Object>> getShopsByShopType(@Param("areaIds") List<Integer> areaIds, @Param("shopType") Integer shopType);

    List<Map<String, Object>> getShopsByShopName(@Param("areaIds") List<Integer> areaIds, @Param("shopName") String shopName);

    List<String> selectShopServiceTypeId(String[] shopId);


    boolean updateShopAddress(Shops shop);

    List<String> selectShopServiceTypeName(String[] shopId);

    boolean updateOpeningStatus(@Param("shopId") String shopId,@Param("status") Integer status);


    boolean updateShopScore(@Param("shopId")String shopId,@Param("score") Double score);
}
